<template>
  <div class="cateStrBar pad">
 
    <span class="bold" :key="i" v-for="(clItem,i) in categoryNameLists">{{ clItem | filterCate(i,categoryNameLists,str)}}</span>
  </div>
</template>

<script>
import { scrollTo } from '@/utils/scroll-to'
export default {
  name: 'Pagination',
  props: {
    list: {
      type: Array,
      default() {
        return []
      }
    },
    label:{
       type: [String,Number]
    },
    str:{
       type: [String],
       default:'/'
    },
  },
  computed: {
    categoryNameLists(){
      const label =this.label
      var arr = []
      if(label){
        this.list.map((item)=>{
           arr.push(item[label])
        })
        return arr
      }
      return this.list
    }
  },
  methods: {
  }
}
</script>
<style lang="scss">

</style>
<style scoped>

</style>
